gh-129813: Use PyBytesWriter in _json:_match_number_unicode
#138957
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The change is very similar to #138956
Initially, I thought that there's a speed up, but I mixed the JSON files, and it's the reverse:
which makes perfect sense given the conversion:
https://github.com/python/cpython/pull/138957/files#diff-efe183ae0b85e5b8d9bbbc588452dd4de80b39fd5c5174ee499ba554217a39edR1110
I mixed up the JSONs; my bad.
I'm surprised with the speed up:Benchmark
The script:
Where
mainis 4e00e25The environment:
sudo ./python -m pyperf system tuneensured.